﻿@model MembershipUser
@{
    ViewBag.Title = "EditUserRoles";
    IEnumerable<KeyValuePair<string, bool>> rolelist = ViewBag.RoleList;
}

<h2>EditUserRoles</h2>

@Model.UserName<br/>
@using(@Html.BeginForm()){


    int x = 0;
    foreach(var c in rolelist)
    {
        @Html.CheckBox("Roles[" + x + "].IsSelected",c.Value)<span>@c.Key</span> 
        @Html.Hidden("Roles[" + x + "].RoleName", c.Key)
        x++;
    }    

<input type="hidden" value="@Model.ProviderUserKey" name="userid"/>
<input type="submit" value="Submit"/>
}

